﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hartley.BusinessLogic;
using Hartley.DTOs;
using Hartley.Entities;

namespace Hartley.ApplicationLogic
{
   public class MemberAL
    {
        HcFacade hcFacade = new HcFacade();

        public string saveMember(MemberDTO memberDTO)
        {
            try
            {
                return hcFacade.saveMember(memberDTO);
            }
            catch
            {
                throw;
            }
        }

        public string saveCommittee(CommitteeDTO committeeDTO)
        {
            try
            {

                return hcFacade.saveCommittee(committeeDTO);
            }
            catch
            {
                throw;
            }
        }

        public string saveCommitteeMembers(CommitteeMemberDTO committeeMemberDTO)
        {
            try
            {
                return hcFacade.saveCommitteeMembers(committeeMemberDTO);
            }
            catch
            {
                throw;
            }
        }


        public string saveMeeting(MeetingDTO meetingDTO)
        {
            try
            {
                return hcFacade.saveMeeting(meetingDTO);
            }
            catch
            {
                throw;
            }
        }

        public string saveMinutes(MinutesDTO minutesDTO)
        {
            try
            {
                return hcFacade.saveMinutes(minutesDTO);
            }
            catch
            {
                throw;
            }
        }


        public string saveSubCommittee(SubCommitteeDTO subCommitteeDTO)
        {
            try
            {
                return hcFacade.saveSubCommittee(subCommitteeDTO);
            }
            catch
            {
                throw;
            }
        }

        public string saveSubCommitteeMember(SubCommitteeMemberDTO subCommitteeMemberDTO)
        {
            try
            {
                return hcFacade.saveSubCommitteeMember(subCommitteeMemberDTO);
            }
            catch
            {
                throw;
            }
        }





        public List<MemberDTO> GetMemberById(Guid memberId)
        {
            return hcFacade.GetMembersbyId(memberId);

        }

        public List<CommitteeDTO> GetCommitteeById(Guid committeeId)
        {
            return hcFacade.GetCommitteeById(committeeId);

        }

        public List<SubCommitteeDTO> GetSubCommitteeById(Guid subCommitteeId)
        {
            return hcFacade.GetSubCommitteeById(subCommitteeId);
        }

        public List<MeetingDTO> GetMeetingById(Guid meetingId)
        {
            return hcFacade.GetMeetingById(meetingId);

        }
        public List<MinutesDTO> GetMinutesById(Guid minutesId)
        {
            return hcFacade.GetMinutesById(minutesId);

        }

        public List<MeetingDTO> GetMeetingNameById(Guid meetingId)
        {
            return hcFacade.GetMeetingNameById(meetingId);

        }




        public List<MemberDTO> GetAllMembers()
        {
            return hcFacade.GetAllMembers();

        }

        public List<CommitteeDTO> GetAllCommittees()
        {
            return hcFacade.GetCommittees();

        }

        public List<SubCommitteeDTO> GetAllSubCommittees()
        {
            return hcFacade.GetAllSubCommittees();

        }


        public List<MeetingDTO> GetAllMeetings()
        {
            return hcFacade.GetAllMeetings();

        }

        public List<MinutesDTO> GetAllMinutes()
        {
            return hcFacade.GetAllMinutes();

        }







        public List<SubCommitteeDTO> GetAllSubCommitteeByCommitteeId(Guid committeeId)
        {
            return hcFacade.GetAllSubCommitteeByCommitteeId(committeeId);
        }

        public List<MeetingDTO> GetAllMeetingOfCommittee(Guid committeeId)
        {
            return hcFacade.GetAllMeetingsOfCommittee(committeeId);

        }

        public List<MinutesDTO> GetAllMinutesByCommitteeId(Guid committeeId)
        {
            return hcFacade.GetAllMinutesByCommitteeId(committeeId);
        }

        public List<MinutesDTO> GetAllMinutesOfMeeting(Guid meetingId)
        {
            return hcFacade.GetAllMinutesOfMeeting(meetingId);

        }

        public List<CommitteeMemberDTO> GetAllMemberOfCommitteeByCommitteeId(Guid committeeId)
        {
            return hcFacade.GetAllMemberOfCommitteeByCommitteeId(committeeId);

        }

        public List<SubCommitteeMemberDTO> GetAllSubCommitteeMemberBySubCommitteeId(Guid subCommitteeId)
        {
            return hcFacade.GetAllSubCommitteeMemberBySubCommitteeId(subCommitteeId);
        }


        public List<MeetingDTO> GetAllMeetingNameById(Guid meetingId)
        {
            return hcFacade.GetMeetingNameById(meetingId);
        }

        public List<CommitteeMemberDTO> getAllRolseOfCommMember(Guid comMembrId)
        {
            return hcFacade.getAllRolseOfCommMember(comMembrId);
        }

        public List<CommitteeMemberDTO> GetAllCommitteeMembers()
        {
            return hcFacade.GetAllCommitteeMembers();

        }

        public List<CommitteeMemberDTO> getCommitteeMemberById(Guid comMembrId)
        {
            return hcFacade.getCommitteeMemberById(comMembrId);

        }

        // public bool validateLogin(string userName,string password)
        // {
        //   hcFacade.validateLogin(userName, password);
        // }
         public bool checkAvailabilityOfUserName(string userName)
        {
          return hcFacade.checkAvailabilityOfUserName(userName);
        }
     
        
    }
}
